﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using ZhimeiSoft.CharmManager.DOL;
using ZhimeiSoft.CharmManager.Server.Factory;
using ZhimeiSoft.CharmManager.Server.BLL.Interface;
using ZhimeiSoft.CharmManager.Server.DAL.Interface;

namespace ZhimeiSoft.CharmManager.Server.BLL
{
    public class EmployeeBLL : IEmployeeBLL
    {
        IEmployeeDAL dal;
        public EmployeeBLL()
        {
            dal = BaseDalFactory.CreateEmployeeDal();
        }

        /// <summary>
        /// 新增员工信息
        /// </summary>
        /// <param name="employee">员工信息实体类</param>
        /// <returns>员工ID</returns>
        public void InsertEmployee(DBEntityEmployee employee)
        {
            dal.InsertEmployee(employee);
        }

        /// <summary>
        /// 更新员工信息
        /// </summary>
        /// <param name="employee">员工信息实体类</param>
        public void UpdateEmployee(DBEntityEmployee employee)
        {
            dal.UpdateEmployee(employee);
        }

        /// <summary>
        /// 删除员工信息
        /// </summary>
        /// <param name="employeeid">员工ID</param>
        public void DeleteEmployee(int employeeid)
        {
            dal.DeleteEmployee(employeeid);
        }

        /// <summary>
        /// 根据状态查询员工列表
        /// </summary>
        /// <param name="state">状态信息</param>
        /// <returns>返回数据</returns>
        public DataSet QueryEmployeeState(string state)
        {
            return dal.QueryEmployeeState(state);
        }
        /// <summary>
        /// 根据条件过滤员工信息
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        public DataSet QeuryEmployeeFilter(string filter)
        {
            return dal.QeuryEmployeeFilter(filter);
        }
    }
}
